<template>
  <el-container>
    <el-aside width="200px">
      <img class="logo-width" src="../assets/logo-white.png" alt="" />
      <el-menu
        class="el-menu-vertical-demo"
        background-color="#ff5a3b"
        text-color="#fff"
        active-text-color="#ff"
      >
        <el-menu-item index="1">
          <i class="el-icon-s-home"></i>
          <span slot="title">首页</span>
        </el-menu-item>
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-setting"></i>
            <span>系统设置</span>
          </template>
          <el-menu-item index="2-1">菜单管理</el-menu-item>
          <el-menu-item index="2-2">角色管理</el-menu-item>
          <el-menu-item index="2-3">管理员管理</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-s-goods"></i>
            <span>商城管理</span>
          </template>
          <el-menu-item index="3-1">分类管理</el-menu-item>
          <el-menu-item index="3-2">规格管理</el-menu-item>
          <el-menu-item index="3-3">商品管理</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-aside>
    <el-container>
      <el-header>
        <div class="login-info">
          <el-dropdown>
            <span class="el-dropdown-link">
              <img src="../assets/logo.png" alt="" />
              管理员
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>
                  <i class="el-icon-user-solid"></i>
                  个人中心</el-dropdown-item>
              <el-dropdown-item>
                  <i class="el-icon-s-tools"></i>
                  系统设置</el-dropdown-item>
              <el-dropdown-item>
                  <i class="el-icon-error"></i>
                  安全退出</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </el-header>
      <el-main>
         <router-view/> 
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {};
</script>

<style>
.el-header {
  background-color: #fff;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.login-info {
  width: 200px;
  float: right;
  line-height: 60px;
}
.login-info img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  vertical-align: middle;
}
.el-aside {
  background-color: #ff5a3b;
  color: #fff;
  text-align: center;
  line-height: 200px;
  height: 100vh;
}
.logo-width {
  width: 160px;
  /* margin-top: 9px; */
}
.el-menu-item i {
  color: white !important;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
}
.el-menu-vertical-demo {
  text-align: left;
}
</style>